Contents
Windows Directory Compare

Version 2.00

Pat Beirne

Overview

Screen

Single Directory View

Double Directory View

Keyboard

Drag and Drop

Copying and Moving Files

Working with the File Manager

Typical Usage

Hidden Features

Versions


Overview

This little program allows you to view the contents of one or two directories, allows file copy between them, and works with the Windows FileManager to support the creation and copy of 4DOS file descriptions.

This program is freeware. Use and distribute any way, but keep this file with the executable. Use  this program at your own risk. Copyright Pat Beirne 1992-1994.


Screen Layout
The Screen

When the program wakes up, you should see:

Single directory mode:

    file name           file size & date & time     80 character of descriptive comment

or double directory mode:

   file name      size/date in source                size and date in dest    80 characters of description

When a files exists in both directories, the little >=< symbol in the middle indicates whether the file on the left (the source) is newer, the same as, or older than the file on the right (the destination).

If, for same reason, the dates are the same, but the sizes are different, the symbol is not equal.


Usage, Single Directory View

Click the 2-dir button off.

The directory list fills with the names of all the files. The list can be sorted by name, size or date, by pushing the appropriate sort-by button.

To create or modify a file description, select the appropriate file by mouse or arrow-key. Then if you type any alpha-numeric key, you will put that key in the description box.

Normal editting works here, including home, end, backspace, delete and Shift-Del, Ctl-Ins, Shift-Ins (cut, copy & paste). [Note: the keys Ctrl-X/C/V do not; these select the source disk; see below.]

To work on the description for another file, simply hit up,dn,pgup or pgdn key.

For those of you in the know, an edit box appears in response to the first alpha key stroke, and disappears when a up,dn,pgup or pgdn key is pressed.

To save the descriptions to disk, hit Exit. Your choice of file sort order is saved as well. To discard the descriptions, hit Quit. You can also close from the system menu, which will save your

descriptions, but not your sort preference.

In single directory mode, the destination drive & dir, the Copy and the Filter buttons do nothing. The Flip button swaps source and destination directories.

The Delete button allows you do delete the files you have selected. You will be asked to confirm these deletions. For more information about selecting files, see Double Directory View.

If you double click on a file name, you will execute that file, according to the FileManager associations. If you double click on a directory name, you will change to that directory. See the discussions on the <Enter> key, below.

In this mode, the program works similarly to WDN and DESCRIBE. All the file descriptions should be compatible with 4DOS, NDOS, DESCRIBE and most of the 4DOS add-ons.


Double directory view
Usage, Double Directory View

Click the 2-dir button on.

The directory list fills with a double list of files, including files from both the left (source) and right (destination) directories. The files are sorted according to the current setting of the sort-by buttons, and filtered according to the filter buttons.

If a file name exists in both directories, the file list shows the entry as in the first three lines above, depending on the date stamps of the files. In the first case, the file on the left (the source) is more recent than the file on the right (the destination). It is also shown selected. On the second line, the right hand file is more recent. On the third line, the files have the same time and date.

If the file exists only in the destination, the entry is shown as on the fourth line. If the file exists in only the source directory, the entry is shown as on the fifth line. This line is also shown selected.

The descriptions shown for the files come from both directories. When the description exists in both directories, the source directory takes precedence.

Sorting

The files may be sorted by name, date or size. For date and size, the source directory date and size takes precedence.

Filtering

You may ask to see all files. Or you may wish to see only the differences. In this case, files that have the same name and date will be hidden, so you can concentrate on the differences. Or you may wish to see similar files. In this latter case, you willsee only files that have the same name in both directories. This mode is great for refreshing floppies in a sneakernet arrangement. [I use this mode to shuttle files from work-to-home-to-work.]

Selecting Files

Any change of source path will auto select files. The selection picks files that are newer in the source, or not present in the destination. With the filter set to All, if you copy all the auto-selected files, then the destination directory will become identical to the source.

You may find the auto-selected file list a bit too crowded in many cases. Try using the Diffs or Similar filter setting to reduce the quantity. Or hit the Clear button to perform manual selection.

After clicking the Clear button, it changes to become SelectAll. Clicking on it now will re-select all the newer-or-unique files.

File selection can be toggled by clicking with the mouse, or hitting the space bar when on top of a file name.

Note: The space bar is also used in the creation of file descriptions. To distinguish between the uses of the space bar, it is decreed that the first character of a file description cannot be a space. If you are at the beginning of a file description, the space bar is interpreted as a file-select toggle.


Keyboard
The Keyboard

The tab key works. The tab order is:

source drive & dir

destination drive & dir

file selector

Exit, Quit, Clear

Copy, Move, Flip, 2-Dir

sort-by (tab-group)

filter (tab-group)

The activation of most of the push buttons will jump the focus to the file selection box.

To select a drive, use the Alt-S (or Alt-T) key to get to the drive box, and hit the key that corresponds to the drive, such as 'c'. To control the directory box, Tab to it, use the arrows to select the directory, and hit the <Enter> key.

Because the source drive is changed so often, there is a quick way to change drives: use the Ctrl-A thru Ctrl-Z keys to select drives A thru Z. Use Ctrl-Shift-A thru Ctrl-Shift-Z to select the destination drive. Doing the latter will also enable 2-directory mode.

If you hit <Enter> when the focus is on a file name, you will execute that file, according to the FileManager associations. For example, if you hit <Enter> when the focus is on a file called "README.TXT", you will wake up the NOTEPAD.EXE with the file README.TXT.

If the program is in 2-dir mode, and the current selection shows two files, the <Enter> key works differently. I interpet the fact that you have picked a 'pair of files' to mean that you wish to compare the two files. A file comparison program is started, to compare the left and right versions of the file. The default compare program is FC.EXE, which comes with DOS, but you may use any compare program by adding a line to the WDRM2.INI file. See Hidden Feaures.

If the current selection is a directory, the <Enter> key will change you to that directory. If the directory is available in both the source and destination, both will change. This is a handy way to run through a directory tree, looking for changes.

Summary:	Alt-A	All files

Alt-B	Sort by file extension

Alt-C	Copy selected source files to dest

Alt-D	Sort by date

Alt-E	Clear the selctions/Select all newer-or-unique

Alt-F	Flip source and destination

Alt-I	Different files only

Alt-L	Delete the selected diles (single dir mode only)

Alt-M	Move selected source files to destination

Alt-N	Sort by name

Alt-Q	Quit; don't save descriptions

Alt-R	Similar files only

Alt-S	Source drive selection

Alt-T	Dest drive selection

Alt-X	Exit; save descriptions

Alt-Z	Sort by size

Alt-2	Double directory list (aka directory compare)

Space	Select file (only when the focus is in the file list box)

Esc	Quit; same as Alt-Q

Ctrl-A thru Z	Switch source to drive A thru Z

Shift-Ctrl-A thru Z	Switch dest to drive A thru Z

Ctrl-\	Clear the selections

Ctrl-/	Select all newer-or-unique

Enter	Either execute or change dir or compare files; see See Hidden Feaures.


Drag and Drop

WDRM2 is compatible with the Win3.1 File Manager drag and drop. It allows you to copy files, including their 4DOS descriptions.

If the program gets a file or group of files dropped on it, it tries to do something sensible.

Mode	Where Dropped	Action

any	source dir	change the source directory

any	dest dir 	change the destination dir; auto switch to

2-dir mode

1-dir	elsewhere	use the dropped dir as source

autoselect the dropped files

if dropped dir is the same as what's already

shown, stay in 1-dir mode

(only the first dropped file selected)

if dropped dir is different, switch to

2-dir mode, and move the old source dir

to the dest

WDRM2 COMES TO TOP.

2-dir	elsewhere	replace the old source dir with the dropped

dir; auto select the dropped files

[The reason here is: you have been using

a 'destination' directory, probably for some

kind of archive usage. Therefore, the dest.

directory is maintained.]

WDRM2 COMES TO TOP.

If a directory is dropped in any of the above cases, the directory changes, but no files are auto-selected.

You can drop files on the program when it is in the iconic state. The action is the same as in the 'elsewhere' case above.

When you drop on the 'elsewhere' case, the program itself becomes the topmost window. You can then check your selection, and Copy or Move the files to the destination. Note that Copy or Move will move the file descriptions to the destination along with the files.

If you are using a drag-n-drop program launcher, such as WinDrop, DROPPER or WINDOCK, you may start up WDRM2 by dropping a file or directory on the launch button. The launch manager will start up WDRM2 and pass the file/directory name in on the command line. The program will start up in the appropriate directory, with the appropriate file selected. If you arrange for the command line to have the /d (or -d) option, an existing instance of WDRM2 will come to the top, with the directory changed appropriately.

To summarize, there are three drop-sensitive areas in WDRM2: the source directory, the destination directory, and the 'rest'. Drops will change the source directory, the destination directory, or the selected files list.


Copying files
Copying and Moving Files

(2-dir mode only)

When the Copy button is pressed, any selected files are copied from the source directory to the destination directory. After each one is copied, the time and date stamps are set to match the source. After all the files are copied, the descriptions are copied into the destination.

As the files are copied, the main directory selections are removed, so you can see the progress.

When the Move button is pressed, any selected files are copied from the source directory to the destination directory. After each one is copied, the time and date stamps are set to match the source. If this all worked properly, the source file is deleted. After all the files are moved, the descriptions are copied into the destination. Because this action actually deletes files, you get a confirm box before the move activity proceeds. NOTE: moving files on the same disk does not raise a confirm box, since the data transfer is a lot safer.

WDRM2 will never* overwrite a newer file with an older one without asking. However, the date/time is based on what was aquired when the program started up. If files have possibly changed in the mean time, you can refresh the file list by re-selecting either the appropriate directory, which will re-read the file information from the disk.

*The word never is to be taken in the context that the operation of this program is not guaranteed. Use at your own risk.


Working with the File Manger
Working with the File Manager

The file FMWDRM2.DLL is a File Manager add on to help with the operation of WDRM2. To add it to your system, open the WINFILE.INI file (using NOTEPAD, for instance), and add the following lines:

[AddOns]

FMWDRM2=fmwdrm2.dll

Copy the three files FMWDRM2.DLL, WDRM2.EXE and WDRM2.HLP to your Windows directory (usually c:\windows).

The next time you start the File Manager, you will notice a new menu item: DirCmp. If you are using Windows for WorkGroups, you will also have a new button on the button bar. If you select this menu item (or push this button), WDRM2 will come up, showing the directory that you were viewing in the File Manager. If you have more than one directory window in the File Manager, WDRM2 will show you a comparision of the last two directories that you selected in the File Manager.

Many thanks to Dieter Prifling, author of WinDrop, for writing this tool, and his kind permission to allow me to include it here.

For other ideas on working with the File Manager, see Drag-and-Drop


Typical Usage

Annotating Files

You have some files you want to describe.

1. From the FileManager

Pick up the file and drop it on WDRM2; the window will open up with the file selected, ready for you to type the description.

It doesn't matter whether the program is running open, iconic or resting in a launch manager.

2. From the Program Manager

Double click on the WDRM2 icon, and change the source drive and directory to the directory of interest.

Remember to Exit the program to save the descriptions. You can force a save by changing either the source or destination directories.

You have a collection of files that you wish to annotate. The files have associations*.

1. From WDRM2

Use the source directory to select the directory of interest. Make sure the 2-dir button is off.

Select each file you are interested in. Double click on it, or hit Enter. The file or its association will be launched. Examine the result & close it. This will return you to WDRM2, ready to type the file description.

*File associations are set in the FileManager. For example, .BMP files can be associated with the PaintBrush program. One of my favorite association is to bind .ZIP, .LZH, .ZOO and .ARC files to a zip manager like SHEZ or WINZIP. With these associations,I can double click on a .ZIP file from WDRM2, examine the zip contents, and return to WDRM2 to write the descriptive comment.

Copying Files

You have some specific files you want to copy.

1. From the FileManager

Pick the files of interest and drop them on WDRM2.

If you dropped the files on a program launcher (like WinDrop, DROPPER or WINDOCK), WDRM2 will wake up with those files selected. Go to the destination drive and directory to select the destination, and click on Copy.

If you dropped the files on a WDRM2 that was running (open or iconic), the old destination directory is preserved, and the files you chose are displayed and selected. Simply click on Copy to confirm the copy.

You may change the file descriptions before the copy.

2. From WDRM2

Use the source and destination directory boxes to select the directories of interest. Click the Clear button to remove all selections. Click on the file names that you wish to copy. Click on Copy.

You want to make one directory a mirror of another.

1. From WDRM2

Use the source and destination directory boxes to select the directories of interest.

Select the All filter button if you wish to copy all the changed files from source to destination. The display will also show the unchanged files. If you find the display too crowded, hit the Diffs button, which will remove the unchanged files. In both cases, hit the Copy button to copy over the files.

You want to freshen the files in one direcotry, using the files in another

1. From WDRM2

Use the source and destination direcotry boxes to select the directories of interest.

Select the Similar filter button to only show files that exist in both directories. (You might also click on the sort ByDate button, which bring changes to the top). Confirm that the changed files are the ones you want, and click on the Copy button.

For all of the above, you can get a quick change on the source drive by using the Ctrl-A thru Ctrl-Z keys. You can also get a quick change of source or destination drive & directory by dropping FileManager files/directories on top of the source or destination directory boxes.

Launching

These ideas will help you get at WDRM2 quicker.

Use the File Manager to set the file associations for .ION to execute WDRM2. That way, if you ever see the file called DESCRIPT.ION in a directory, you can double click on it to view the file descriptions.

Use a desktop like WinDrop, NortonDesktopForWindows, DROPPER, RIPBAR or SUCKER. Place WDRM2 on the bar/desktop as an icon, and you can easily lauch it, or drop a file onto it.

Add FMWDRM2.DLL to your FileManager. This is a quick way to wake up WDRM2 with two different directories.


Hidden Features

Selectable Fonts

The master font for all buttons and list boxes may be selected by adding a line to your WDRM2.INI file. The key word is Fonts and the three phrases are font-name, font-size, and 1 for bold. Try

Font=Arial,11,0

Font=MS Sans Serif,10,0 (default)

Comparing Files

When you are in 2-dir mode, you can compare the two files by hitting the <Enter> key, or by a double click on the entry. I interpet the fact that you have picked a 'pair of files' to mean that you wish to compare the two files. A file comparison program is started, to compare the left and right versions of the file. The default compare program is FC.EXE, which comes with DOS, but you may use any compare program by adding a line to the WDRM2.INI file, of the form:

CompareFunction=fc %s %s

CompareFunction=fcn %s %s

CompareFunction=match %s %s

CompareFunction=c:\winapps\match.exe %s %s

The phrase 'CompareFunction='must be exact. On the right of the equal sign, include the name of any file-compare program that can take two file names. Use the %s symbols to indicate how the file names should be inserted. Some popular programs are FC.EXE by Mike Albert and MATCH.EXE by Barry Press.

Help

As you have discovered, you can get help by hitting the F1 key, or selecting Help from the system menu.

Customizing the File List

There are two entries in the system menu which allow you to:

include hidden files in the file list

include directories in the file list

The corresponding entries in WDRM2.INI are:

ShowHiddenFiles=N

ShowDirs=Y

(defaults shown). These values are stored in the .INI file if you hit the Exit button. Hitting Quit or Close (on the system menu) discards the current setting.

Also, if you wish to list the file names in upper case, you can add the following line to your WDRM2.INI: (default is N)

UpperCase=Y

Whenever the source directory changes, the selection list is refreshed to show all the newer-or-unique files, assuming you want a selection list of the interesting differences between the directories. If you would have have the selection inhibited, add the following to your WDRM2.INI:

AutoSelect=N

You can still get the selection by clicking on the SelectAll button. Default is Y.

If a file copy or move takes more than 5 seconds, you will hear a beep to indicate completion. If you wish to inhibit this, add the following line: (default is Y)

BeepOnLongCopy=N


Versions and warnings
Versions

The name WDRM2 comes from Windows Directory Match, 2nd implementation. Its heritage goes back a ways.

Version 2.00

fixed several problems that occurred when filename had high ASCII characters

changed the CD-ROM detection logic so that it works on NT

when in the middle of editting a file description, the Enter key now accepts the description, and displays it properly

Version 1.01

allow multiple select in single-dir mode

introduce auto-select, only on source directory change

keep the source selection, even through the  All/Diffs/Similar/Order/Hidden/Dirs/ShowDest/right-dir-change events

make the Clear button do double duty; if no files are selected, this button becomes SelectAll

when selections are set or cleared, the file list box scrolling stays where it was

introduce the Delete button, sharing the Move button

don't write DESCRIPT.ION if there are no descriptions

check for source==dest before file copy

shift-control-letter to select destination drive

if the dest directory comments are dirty, write them out

fix the UI problem with click-drag creating false selects

dropped files does bring WDRM2 to the top, just like the docs say

if you repeatedly drop files from the same directory, you do not get the descriptions changed; save? message

decorated message boxes

added beep-on-long-copy option

Version 1.00

changed the file-move logic to simply do a rename if the disk is the same letter

fixed a problem with ParseAndFill selecting the wrong file

fixed the version-info resource

Version 0.99

Fixed a problem on the Novell network, where we dont get .. directories without special code.

Version 0.98

Added the move button.

Added the command line option /d for waking up an existing instance.

Added variable font, by means of WDRM2.INI. This implies minor changes the horizontal spacing in the main list box.

Added Ctl-/ and Ctl-\ to list box actions (select all and clear select).

Corrected minor painting error in the disk combo box.

Added directories to the list box. Directories may have comments/descriptions saved in DESCRIPT.ION.

Added the ability to list hidden files in the list box.

Added the ability to list the files in upper case. Yuck.

Version 0.9

Added 'sort by extension'

Date and time formats are read from WIN.INI [intl]; this makes the screen shots in this .hlp file slightly incorrect.

Close help file on exit

Add browse button to help file

(Many thanks to Dieter Prifling, the author of WinDrop for his suggestions).

Version 0.8

Fixed a problem with file copy to a full disk

Added dest-disk free space check before file copy.

Added 'file-size-not-equal' to the <=> collection.

Change caption line during launch/compare; feedback for the user.

Version 0.7

Fix a problem with removable drive 'disk missing' error

Minor internal changes; use the LBS_WANTKEYBOARDINPUT feature

Hide the selection count when in single-dir mode

Version 0.6

Change the drive and directory boxes to look and feel like the Win3.1 file open box

Drives now show volume names.

Fixed selection count so it tracks better.

Changed the disk copy yield code to let other apps run better. Most WDRM2 keys will abort a copy.

Limitations

Hidden files are not shown.

File copy is slow.

If the copy destination fills, your files and descriptions will be lost.

WARNINGS

Use WDRM2 at your own risk.

File copies are not guaranteed, and file descriptions may be sometimes lost.

Bugs and constructive feed back appreciated.

     Pat Beirne

     patb@corel.ca

     CServe: 76475,3640

Plans:

     add better looking buttons, with pictures

     speed up file copy


Heritage

This program, WDRM2, is the latest in a long line of directory tools, which began with the famous DIRMATCH program, written by Michael Mefford. Some version were written for PC Magazine. I dont know when the first one appeared, but my most recent copy is dated 1989. My copy also reads (c) 1989 Ziff Communications Co.

This program shows the users two directories, matching up similar files side-by-side. The user can select filters to show all the files, different files or similar files. The user may then copy or move files from left-to-right. Obviously, this was the inspiration for the layout of WDRM2, and I thank Mr. Mefford for this.

Mr. Meffort also wrote another little program, DIRNOTES, which allows you to add 38 character comments to files in a directory. My most recent copy is dated 1987, and is also marked as Copyright 1987 Ziff-Davis Publishing Co.

I became quite dependent on both of these, and when we all moved to Windows, I sorely missed them. I often kept a DOS box open just to run these two tools.

In Dec. 1990, I release WDN, which is a Windows version of DIRNOTES. It looked a lot like WDRM2 in the single-directory mode. The comment files where stored in such a way that they could be used by both WDN and DIRNOTES, from Windows and DOS respectively.

WDN was featured in Windows Gizmos, by Brian Livingston, and is on the disk.

In Feb 1993, I released WDRM, implementing most of DIRMATCH, but in Windows. It was a VB app, and I had trouble getting the load and sort times down to anything reasonable. It never went very far.

At this point, I realized that the file-comments format that was used by DIRNOTES and WDN was too different. Most other programs were using 4DOS type description (DESCRIPT.ION) files. I switched over. BTW, I have a little DOS app which translates old-style descriptions to new-style. If you have a large investment in WDN/DIRNOTES description files, fee free to contact me.

In Sept. 1993, I release the first version of WDRM2. It has grown a lot since then, thank mostly to the feedback and support of Dieter Prifling, author of WinDrop.